package com.qing.eduservice.controller;

import com.qing.servicebase.utils.ResponseResult;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName Yjx
 * @Description TODO
 * @date 2022/9/7 9:48
 * @Version 1.0
 */
@RestController
@RequestMapping("/eduservice")
public class EduTeacherLoginController {

    @PostMapping(value = "/login")
    public ResponseResult login(){
        Map<String, String> map = new HashMap<>();
        map.put("token","roles");
        return ResponseResult.ofSuccess(map);
    }

    @GetMapping(value = "/info")
    public ResponseResult getInfo(){
        Map<String, String> map = new HashMap<>();
        map.put("roles","[admin]");
        map.put("name","admin");
        map.put("avatar","https://online-teach-file.oss-cn-beijing.aliyuncs.com/teacher/2019/10/30/b8aa36a2-db50-4eca-a6e3-cc6e608355e0.png");
        return ResponseResult.ofSuccess(map);
    }

}
